﻿package  {
	
	import flash.display.MovieClip;
	import flash.events.Event;
	
	
	public class Level extends MovieClip {
		static public const LEVEL_COMPLETED = "levelCompleted";
		
		private var main: Main = null;
		public function get level (): Number {
			return _level;
		}
		
		public function set level(n: Number): void {
			_level = n;
			labelLevel.text = "" + n;
			dispatchEvent(new Event(LEVEL_COMPLETED));
		}
		
		public var _level: Number = 1;
		public function Level() {
			labelLevel.text = "1";
			
			
			main = Main(root);
			main.level = this;
			trace(main);
			
		}
	}
	
}
